<template>

      <el-container style="border: 1px solid rgb(230,230,230);margin-top: 30px;margin-bottom: 30px;width:100%">
        <!-- 侧边栏容器 -->
        <el-aside >
          <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            @select="handleSelect">
            <el-menu-item index="1">
              <i class="el-icon-user"></i>
              <span>商家服务</span>
            </el-menu-item>


            <el-menu-item-group>
              <el-menu-item index="2">
                <i class="el-icon-guide"></i>
                <span>服务类型</span>
              </el-menu-item>
              <el-menu-item index="3">
                <i class="el-icon-goods"></i>
                <span>服务订单</span>
              </el-menu-item>
              <el-menu-item index="4">
                <i class="el-icon-tickets"></i>
                <span>所有服务</span>
              </el-menu-item>

                  <el-menu-item index="5">
                <i class="el-icon-tickets"></i>
                <span>我的小区</span>
              </el-menu-item>
            </el-menu-item-group>

          </el-menu>
        </el-aside>

        <!-- 主要区域 -->
        <el-main style="">
          <!-- 展示路由页面 -->
          <router-view/>

        </el-main>

      </el-container>

</template>
<script>
export default {
 methods: {
      handleSelect: function(index){
        // console.log(index);
        if(index == 2){
          this.$router.push('/servicetype')
        }
        if(index == 3){
          this.$router.push('/serviceorder')
        }
        if(index == 4){
          this.$router.push('/serviceall')
        }
        if(index == 5){
          this.$router.push('/servicecommunity')
        }
      }
    }

}
</script>
<style>

</style>
